package problems.solved;

import java.math.BigInteger;
import java.util.Set;
import java.util.TreeSet;

public class Problem29 {
    private static final int TARGET = 100;
    
    public static void main(String[] args) {
        Set<BigInteger> set = new TreeSet<BigInteger>();
 
        for (int i = 2; i <= TARGET; i++) {
            for (int j = 2; j <= TARGET; j++) {
                set.add(BigInteger.valueOf(i).pow(j));
            }
        }
        
        System.out.println(set.size() + " numbers found"); // 9183
    }
}